﻿<%@ taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<script type='text/javascript' src="<c:url value='/common/js/highcharts.js' />"></script>
<script type='text/javascript' src="<c:url value='/common/js/exporting.js' />"></script>
<script type="text/javascript">
	function getReport(url) 
	{
		window.open (url);
	}
	
	$(function () {
		Highcharts.setOptions({
			lang: {
				months: ['一月', '二月', '三月', '四月', '五月', '六月',  '七月', '八月', '九月',
				 '十月', '十一月', '十二月'],
				weekdays: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
				downloadJPEG: '下载成JPEG图像',
				downloadPDF: '下载成PDF文档',
				downloadPNG: '下载成PNG图像',
				downloadSVG: '下载成SVG矢量图像',
				printChart: '打印图表',
				loading: '加载中...',
				contextButtonTitle: '图表上下文菜单'
			}
		});

		$('#container').highcharts({
			chart: {
				plotBackgroundColor: null,
				plotBorderWidth: null,
				plotShadow: false
			},
			title: {
				text: 'Browser market shares at a specific website, 2010'
			},
			tooltip: {
				pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
			},
			plotOptions: {
				pie: {
					allowPointSelect: true,
					cursor: 'pointer',
					dataLabels: {
						enabled: true,
						color: '#000000',
						connectorColor: '#000000',
						format: '<b>{point.name}</b>: {point.percentage:.1f} %'
					}
				}
			},
			series: [{
				type: 'pie',
				name: 'Browser share',
				data: [
					['Firefox',   45.0],
					['IE',       26.8],
					{
						name: 'Chrome',
						y: 12.8,
						sliced: true,
						selected: true
					},
					['Safari',    8.5],
					['Opera',     6.2],
					['Others',   0.7]
				]
			}]
		});
	});
</script>

<a id="report_1" href="javascript:void(0)" onclick="getReport('<c:url value='/pdf/goodsReport/reportGoodsByPrice' />')"><spring:message code="report.countHighLowPrice" /></a><br/>
<a id="report_2" href="javascript:void(0)" onclick="getReport('<c:url value='/pdf/goodsReport/generatePieForGoodsQuantityByType' />')"><spring:message code="report.countGoodsQuantityByType" /></a><br/>
<a id="report_3" href="javascript:void(0)" onclick="getReport('<c:url value='/pdf/goodsReport/generateBarForGoodsQuantityByType' />')"><spring:message code="report.countGoodsQuantityByType2" /></a><br/>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
